# _*_ coding:utf-8 _*_
# @Time : 2023/5/23 16:15
# @Author : wsl
# @File : day08_pyechars
# @Project : pyecharts官网https://gallery.pyecharts.org/#/README  代码运行结果在新生成的html
from pyecharts.charts import Line
import pyecharts.options as opts

line = Line(init_opts=opts.InitOpts(width="1600px",height="800px"))
line.add_xaxis(["中国", "美国", "韩国"])
line.add_yaxis("GDP", [30, 20, 10])
line.set_global_opts(
    title_opts=opts.TitleOpts(title="2023年人口出生率对比",pos_left="center"),
    xaxis_opts=opts.AxisOpts(name="时间"),
    yaxis_opts=opts.AxisOpts(name="确诊人数"),
    legend_opts=opts.LegendOpts(pos_left='70%')
)
line.render("../image/output/pyecharts.html")